{\rtf1\ansi\ansicpg936\cocoartf1404\cocoasubrtf470
{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;\f1\fnil\fcharset134 PingFangSC-Regular;\f2\fnil\fcharset0 Menlo-Regular;
}
{\colortbl;\red255\green255\blue255;\red67\green67\blue67;\red35\green35\blue35;\red83\green104\blue112;
\red252\green244\blue220;\red37\green146\blue134;\red33\green118\blue199;\red115\green138\blue4;\red0\green0\blue255;
\red255\green0\blue0;\red129\green144\blue144;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\paperw11900\paperh16840\margl1440\margr1440\vieww12740\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\partightenfactor0

\f0\b\fs64 \cf2 \expnd0\expndtw0\kerning0
NSData
\f1 \'d6\'ae\'bc\'e4\'ca\'fd\'be\'dd\'c0\'e0\'d0\'cd\'d7\'aa\'bb\'af\
\pard\pardeftab720\partightenfactor0

\b0\fs32 \cf3 \'d4\'da\'d7\'f6
\f0 TCP
\f1 \'ca\'fd\'be\'dd\'b4\'ab\'ca\'e4\'d6\'d0\'a3\'ac\'d0\'ad\'d2\'e9\'cd\'f9\'cd\'f9\'d0\'e8\'d2\'aa\'b4\'ab\'ca\'e4\'b5\'c4\'ca\'c7
\f0 Byte
\f1 \'ca\'fd\'d7\'e9\'a3\'ac\'b6\'f8\'d4\'da
\f0 iOS
\f1 \'d6\'d0\'ce\'d2\'c3\'c7\'b3\'a3\'b3\'a3\'b6\'bc\'ca\'c7\'b7\'a2\'cb\'cd\'b5\'c4
\f0 NSData
\f1 \'c0\'e0\'d0\'cd\'a3\'ac\'d5\'e2\'ca\'b1\'ce\'d2\'c3\'c7\'be\'cd\'d0\'e8\'d2\'aa\'d7\'aa\'bb\'af\'a1\'a3\'be\'df\'cc\'e5\'b2\'d9\'d7\'f7\'c8\'e7\'cf\'c2\'a3\'ba\
\
\pard\tx220\tx720\pardeftab720\li720\fi-720\qj\partightenfactor0
\ls1\ilvl0
\f0 \cf3 \kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
Byte 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  NSData
\f2\fs24 \cf4 \cb5 Byte byte[] = \{\cf6 0x55\cf4 , \cf6 0x07\cf4 , \cf6 0x02\cf4 , \cf6 0x01\cf4 , \cf6 0x1A\cf4 , \cf6 0x01\cf4 , \cf6 0xAA\cf4 \};\
\pard\tx220\tx720\pardeftab720\li720\fi-720\qj\partightenfactor0
\ls1\ilvl0\cf4 \kerning1\expnd0\expndtw0 {\listtext	\'95	}\expnd0\expndtw0\kerning0
NSData *data = [NSData dataWithBytes:byte lenght:\cf6 7\cf4 ];
\f0\fs32 \cf3 \cb1 \
\pard\tx566\pardeftab720\qj\partightenfactor0
\cf3 \
\pard\pardeftab720\qj\partightenfactor0
\cf3 \
NSData 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  Byte\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf4 \cb5 NSString *\cf7 test\cf4 String = @\cf6 "1234567890"\cf4 ;
\f1 \'a1\'a1\'a1\'a1
\f2 \
NSData *\cf7 test\cf4 Data = [\cf7 test\cf4 String dataUsingEncoding: NSUTF8StringEncoding];
\f1 \'a1\'a1\'a1\'a1
\f2 \
Byte *\cf7 test\cf4 Byte = (Byte *)[\cf7 test\cf4 Data bytes];
\f0\fs32 \cf3 \cb1 \
\
int 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  NSData\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf8 \cb5 int\cf4 \cb5  i = \cf6 1\cf4 ;\
\pard\pardeftab720\qj\partightenfactor0
\cf7 NSData\cf4  *data = [\cf7 NSData\cf4  dataWithBytes:&i length: \cf8 \cb5 sizeof\cf4 \cb5 (i)];\
\
\pard\pardeftab720\qj\partightenfactor0

\f0\fs32 \cf3 \cb1 NSData 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  int\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf8 \cb5 int\cf4 \cb5  k;\
[data getBytes: &k length: \cf8 \cb5 sizeof\cf4 \cb5 (k)];\
\
\pard\pardeftab720\qj\partightenfactor0

\f0\fs32 \cf3 \cb1 NSData 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  NSString\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf7 \cb5 NSString\cf4  *aString = [[\cf7 NSString\cf4  alloc] initWithData:adata encoding:\cf7 NSUTF8StringEncoding\cf4 ];\
\
\pard\pardeftab720\qj\partightenfactor0

\f0\fs32 \cf3 \cb1 NSString 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  NSData\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf7 \cb5 NSString\cf4  *aString = \cf6 @"1234"\cf4 ;\
\cf7 NSData\cf4  *aData = [aString dataUsingEncoding: \cf7 NSUTF8StringEncoding\cf4 ];\
\
\pard\pardeftab720\qj\partightenfactor0

\f0\fs32 \cf3 \cb1 UIImage 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  NSData\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf7 \cb5 NSData\cf4  *imageData = \cf7 UIImagePNGRepresentation\cf4 (image);\
\
\pard\pardeftab720\qj\partightenfactor0

\f0\fs32 \cf3 \cb1 NSData 
\f1 \'d7\'aa\'bb\'af\'ce\'aa
\f0  UIImage\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf7 \cb5 NSData\cf4  *imageData = [\cf7 NSData\cf4  dataWithContentsOfFile: filePath];
\f1 \'a1\'a1\'a1\'a1
\f2 \
\cf7 UIImage\cf4  *image = [\cf7 UIImage\cf4  imageWithData: imageData];\
\
\pard\pardeftab720\partightenfactor0

\f1\b\fs36 \cf3 \cb1 \'d7\'a2\'d2\'e2
\f0 \
\pard\pardeftab720\partightenfactor0

\f1\b0\fs32 \cf9 \'bc\'d9\'c8\'e7\'c4\'e3\'c3\'c7\'b9\'ab\'cb\'be\'ba\'f3\'cc\'a8\'ca\'c7
\f0 java
\f1 \'bf\'aa\'b7\'a2\'b5\'c4\'a3\'ac\'b6\'f8\'d6\'ae\'bc\'e4\'d3\'d6\'d2\'aa\'bd\'f8\'d0\'d0\'ca\'fd\'be\'dd\'b4\'ab\'ca\'e4\'a3\'ac\'c4\'c7\'c3\'b4
\b \'bf\'c9\'c4\'dc
\f0  
\f1\b0 \'be\'cd\'bb\'e1\'c9\'e6\'bc\'b0\'b4\'f3\'d0\'a1\'b6\'cb\'b5\'c4\'ca\'fd\'be\'dd\'ce\'ca\'cc\'e2\'a1\'a3\'d2\'f2\'ce\'aa
\f0 java
\f1 \'c4\'ac\'c8\'cf\'ca\'c7\'b4\'f3\'b6\'cb\'a3\'ac
\f0 iOS
\f1 \'b2\'c9\'d3\'c3\'b5\'c4\'ca\'c7\'d0\'a1\'b6\'cb\'c4\'a3\'ca\'bd\'a3\'ac\'cb\'f9\'d2\'d4\'d0\'e8\'d2\'aa\'d7\'aa\'bb\'af\'a1\'a3\'be\'df\'cc\'e5\'b2\'d9\'d7\'f7\'c8\'e7\'cf\'c2\'a3\'ba\cf3 \
\
\pard\pardeftab720\qj\partightenfactor0
\cf10 1.\'cf\'c8\'bd\'f8\'d0\'d0\'b4\'f3\'d0\'a1\'b6\'cb\'c5\'d0\'b6\'cf\cf3 \
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf8 \cb5 int\cf4 \cb5  \cf7 checkCPUendian\cf4 () \{\cf11 \cb5 //
\f1 \'b7\'b5\'bb\'d8
\f2 1
\f1 \'a3\'ac\'ce\'aa\'d0\'a1\'b6\'cb\'a3\'bb\'b7\'b4\'d6\'ae\'a3\'ac\'ce\'aa\'b4\'f3\'b6\'cb\'a3\'bb
\f2 \cf4 \cb5 \
 \cf8 \cb5 union\cf4 \cb5 \
 \{\
     \cf8 \cb5 unsigned\cf4 \cb5  \cf8 \cb5 int\cf4 \cb5   a;\
     \cf8 \cb5 unsigned\cf4 \cb5  \cf8 \cb5 char\cf4 \cb5  b;\
 \}c;\
 c.a = \cf6 1\cf4 ;\
 \cf8 \cb5 return\cf4 \cb5  \cf6 1\cf4  == c.b;\
\}\
\
\pard\pardeftab720\qj\partightenfactor0

\f1\fs32 \cf3 \cb1 \'d4\'d9\'bd\'ab\'d0\'a1\'b6\'cb\'d7\'aa\'bb\'af\'ce\'aa\'b4\'f3\'b6\'cb
\f0 , 
\f1 \'c0\'fb\'d3\'c3
\f0 C
\f1 \'d3\'ef\'d1\'d4\'ba\'af\'ca\'fd
\f2\fs24 \cf4 \cb5 ntohl()
\f1\fs32 \cf3 \cb1 \'bd\'f8\'d0\'d0\'d7\'aa\'bb\'bb\
\pard\pardeftab720\qj\partightenfactor0

\f2\fs24 \cf8 \cb5 int\cf4 \cb5  newSize = size;\
 \cf8 \cb5 if\cf4 \cb5  (checkCPUendian() == \cf6 1\cf4 ) \{\
     newSize = ntohl(size);\cf9 \cb5 //
\f1 \'d0\'a1\'b6\'cb\'d7\'aa\'b4\'f3\'b6\'cb
\f2 \cf4 \cb5 \
 \}}